//
//  RCCheckInModuleCell.m
//  RocketProject
//
//  Created by chen jiedan on 13-9-24.
//  Copyright (c) 2013年 Rocket. All rights reserved.
//

#import "RCCheckInModuleCell.h"
#import "CommonDefines.h"
#import "UIColor-Expanded.h"

@implementation RCCheckInModuleCell{
    UILabel *_headLabel;
    UILabel *_keywords;
    UILabel *_distance;
    
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        [self createPlaceHolder];
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (void) createPlaceHolder
{
    _headLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 15, 2800, 20)];
    _headLabel.backgroundColor = [UIColor clearColor];
    _headLabel.textColor = kNormalHeadTextColor;
    _headLabel.font = [UIFont fontWithName:kFontNameHelvetica size:20];
    [self.contentView addSubview:_headLabel];
    [_headLabel release];
    
    _keywords = [[UILabel alloc] initWithFrame:CGRectMake(15, 45, 230, 15)];
    _keywords.backgroundColor = [UIColor clearColor];
    _keywords.textColor = kNormalTextColor;
    _keywords.font = [UIFont fontWithName:kFontNameHelvetica size:15];
    [self.contentView addSubview:_keywords];
    [_keywords release];
    
    _distance = [[UILabel alloc] initWithFrame:CGRectMake(250, 45, 60, 15)];
    _distance.backgroundColor = [UIColor clearColor];
    _distance.textColor = kNormalTextColor;
    _distance.font = [UIFont fontWithName:kFontNameHelvetica size:15];
    [self.contentView addSubview:_distance];
    [_distance release];
    
    
    UIView *horizonLine = [[UIView alloc]initWithFrame:CGRectMake(15, 71, 320-30, 1)];
    horizonLine.backgroundColor = [UIColor colorWithHex:0xffe6e6e6];
    [self.contentView addSubview:horizonLine];
    [horizonLine release];
    
}

//- (void) bindData:(RCCheckInItemDataModel *)itemData
//{
//    _headLabel.text = itemData.merchant_name;
//    _keywords.text = itemData.keywords;
//    if ([itemData.distance intValue] == 0) {
//        _distance.hidden = YES;
//    }else{
//        NSInteger dis = [itemData.distance intValue];
//        if (dis > 1000) {
//            _distance.text = [NSString stringWithFormat:@"%dkm",dis/1000];
//
//        }else{
//            _distance.text = [NSString stringWithFormat:@"%@m",itemData.distance];
//        }
//        _distance.hidden = NO;
//    }
//}
@end
